<template name="instance_button">
	<div class="instance-left-buttons flex">
		{{#unless isMobile}}
			<button type="button" class="btn btn-default btn-instance-back hidden">
				&nbsp;<i class="ion ion-android-arrow-back"></i>&nbsp;
			</button>
		{{/unless}}
		{{#if enabled_submit}}
			<div class="slds-button slds-button_brand slds-button--neutral slds-truncate btn-instance-submit">
				<a href="javascript:void(0);" title="{{_ 'Send'}}" class="">
					<div class="record-edit-text slds-truncate" title="{{_ 'Send'}}">{{_ 'Send'}}</div>
				</a>
			</div>
		{{/if}}
		<div class="slds-button-group ml-2" role="group">
			<!-- 传阅、取回、重定位、流程图四个按钮放外面，会同时出现的只有发送和传阅  -->
			{{#each mainButtons}}
				<div class="slds-button slds-button--neutral slds-truncate {{classNames}}">
					<a href="javascript:void(0);" title="{{name}}" class="">
						<div class="record-edit-text slds-truncate" title="{{name}}">{{name}}</div>
					</a>
				</div>
			{{/each}}
			<!-- 其他按钮放折叠菜单里面  -->
			{{#if foldedButtons.length}}
				<div class="slds-dropdown-trigger slds-dropdown-trigger_click slds-button_last">
					<div data-toggle="dropdown" aria-haspopup="true" title="Show More">
						{{> steedos_button className="slds-button_icon-border-filled" iconCategory="utility" iconName="down" variant="icon" title="显示更多"}}
					</div>
					<div class="dropdown-menu dropdown-menu-right crm-header-menu" role="menu">
						<ul class="slds-dropdown__list slds-show">
							{{#each foldedButtons}}
								<li class="slds-dropdown__item crm-header-menu-item {{classNames}}" role="presentation">
									<a href="javascript:void(0);" title="{{name}}" class="" role="option" tabindex="-1">
										<span>{{name}}</span>
									</a>
								</li>
							{{/each}}
						</ul>
					</div>
				</div>
			{{/if}}
		</div>
	</div>
</template>
